<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>新闻管理</title>
	<!-- Tell the browser to be responsive to screen width -->
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<!-- Bootstrap 3.3.6 -->
	<link rel="stylesheet" href="${siteurl}bootstrap/css/bootstrap.min.css">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="${siteurl}plugins/FontAwesome/css/font-awesome.min.css">
	<!-- Ionicons -->
	<link rel="stylesheet" href="${siteurl}plugins/ionicons201/css/ionicons.min.css">

	<link rel="stylesheet" type="text/css" href="${siteurl}plugins/webuploader/webuploader.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="${siteurl}dist/css/AdminLTE.min.css">
	<!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
	<link rel="stylesheet" href="${siteurl}dist/css/skins/_all-skins.min.css">
	<!-- bootstrap-switch -->
	<link rel="stylesheet" href="${siteurl}plugins/bootstrap-switch/css/bootstrap3/bootstrap-switch.min.css">

	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
	<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
	<!-- jQuery 2.2.3 -->
	<script src="${siteurl}plugins/jQuery/jquery-2.2.3.min.js"></script>

	[#include "/admin/common/commons.html"]
	[#include "/admin/common/fileuploads.html"]
</head>
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">

	<header class="main-header">
		<!-- Header Navbar: style can be found in header.less -->
		[#include "/admin/common/nav.html"]
	</header>

	<!-- =============================================== -->

	<!-- Left side column. contains the sidebar -->
	<aside class="main-sidebar">
		<!-- sidebar: style can be found in sidebar.less -->
		<section class="sidebar">
			<!-- Sidebar user panel -->
			[@user_panel /]
			<!-- search form -->
			[@sidebar_form /]
			<!-- /.search form -->
			<!-- sidebar menu: : style can be found in sidebar.less -->
			<ul class="sidebar-menu">
				<li class="header">主面板</li>
				[@menustag id=1]
				[#list list as item]
				[@menu item "1,12,14"]
				[/@menu]
				[/#list]
				[/@menustag]
			</ul>
		</section>
		<!-- /.sidebar -->
	</aside>

	<!-- =============================================== -->

	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>
				新闻管理
				<small>管理你的新闻</small>
			</h1>
		</section>
		<!-- Main content -->
		<section class="content">

			<!-- Default box -->
			<div class="col-xs-12">
				<div class="box box-default box-solid">
					<div class="box-header with-border">
						<h3 class="box-title">添加新闻</h3>
					</div>
					<!-- /.box-header -->
					<!-- form start -->
					<form class="form-horizontal" action="${siteurl}admin/article/model_save.htm" method="post">
						<div class="box-body">
							<div class="form-group">
								<label for="title" class="col-sm-2 control-label">标题</label>
								<div class="col-sm-10">
									<input class="form-control" maxlength="50" id="title" name="title" placeholder="标题" type="text">
								</div>
							</div>
							<div class="form-group">
								<label for="catalogarticle" class="col-sm-2 control-label">新闻类型</label>
								<div class="col-sm-10">
									<select class="form-control" id="catalogarticle" name="catalog.id" >
										[#if catalogs??]
										[#list catalogs as item]
										<option value="${item.id}">${item.name!''}</option>
										[/#list]
										[/#if]
									</select>
								</div>
							</div>
							<div class="form-group">
								<label for="publisher" class="col-sm-2 control-label">发布人</label>
								<div class="col-sm-10">
									<input class="form-control" maxlength="50" id="publisher" name="publisher" placeholder="发布人" type="text">
								</div>
							</div>
							<div class="form-group">
								<label for="introduction" class="col-sm-2 control-label">新闻简介</label>
								<div class="col-sm-10">
									<textarea class="form-control" id="introduction" name="introduction" placeholder="简介"></textarea>
								</div>
							</div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">新闻图标（210*150）</label>

                                <div class="col-md-10" >
									[@fileinput name="img"  image="" /]
                                </div>
                            </div>

							<div class="form-group">
								<label class="col-md-2 control-label">新闻内容</label>

								<div class="col-md-10">
									<!-- 加载编辑器的容器 -->
									<script id="contents" name="contents" type="text/plain">
									</script>
								</div>
							</div>

						</div>
						<!-- /.box-body -->
						<div class="box-footer">
							<a href="${siteurl}admin/article/view_list.htm" class="btn btn-default">取消</a>
							<button type="submit" class="btn btn-primary pull-right">保存</button>
						</div>
						<!-- /.box-footer -->
					</form>
				</div>
			</div>
			<!-- /.box -->

		</section>
		<!-- /.content -->
	</div>
	<!-- /.content-wrapper -->

	[#include "/admin/common/footer.html"]

	<!-- Control Sidebar -->
	[#include "/admin/common/aside.html"]

	<!-- /.control-sidebar -->
	<!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
	<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- Bootstrap 3.3.6 -->
<script src="${siteurl}bootstrap/js/bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="${siteurl}plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="${siteurl}plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="${siteurl}dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="${siteurl}dist/js/demo.js"></script>
<!-- 配置文件 -->
<!-- bootstrap-switch -->
<script src="${siteurl}plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<script type="text/javascript" src="${siteurl}plugins/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="${siteurl}plugins/ueditor/ueditor.all.min.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    $('input[type="checkbox"]').bootstrapSwitch();
    var ue = UE.getEditor('contents',{
        toolbars: [
            ['fullscreen', 'source','drafts',  'paragraph', 'fontfamily', 'fontsize',  'insertorderedlist', 'insertunorderedlist', 'simpleupload','insertimage', 'emotion', 'bold','insertcode','preview']
        ],
            autoHeightEnabled: true,
            autoFloatEnabled: false})
    ue.ready(function() {
        ue.setHeight(400);
    });
</script>
<script type="text/javascript">
        $(document).ready(function () {
            [#if msg??]
            swal("保存成功!", "", "success");
            [/#if]
        });
	</script>
</body>
</html>
